package simi;

import java.util.List;
import java.io.File;
import java.io.FilenameFilter;

public class ImageFileFilter implements FilenameFilter {

	private List extensions = SimiPropertyManager.getConfig().getList(
			"images.type");

	public ImageFileFilter() {
		super();
	}

	public boolean accept(File dir, String name) {

		String ext = SimiUtils.getFileExtension(name);
		if (ext != null && extensions.contains(ext))
			return true;
		else
			return false;
	}
}
